$(function(){
	function getQueryString(name) {
		var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
		var r = location.search.substr(1).match(reg);
		if(r != null) return unescape(decodeURI(r[2]));
		return null;
	}
	var productid = getQueryString("productId");
	//太简单
	$.ajax({
		type:"get",
		url:"http://127.0.0.1:3000/api/getdiscountproduct",
		async:true,
		data:{productid:productid},
		dataType:"json",
		success:function(data){
			console.log(data)
			var html =  template("menu_ZK",data);
			$("#menu").html(html);
			$(".pj_zx").html(data.result[0].productComment)
		}
	});
})